﻿using Newtonsoft.Json;

namespace Models
{
    /// <summary>
    /// webservice请求参数
    /// </summary>
    /// <typeparam name="T">请求的数据类型</typeparam>
    /// <typeparam name="T2">返回的数据类型</typeparam>
    public class Request
    {
        public RequestHeader Header { set; get; }


        public string ToJsonString()
        {
            string json = JsonConvert.SerializeObject(this);
            return json;
        }

        public object Data { set; get; }
    }

    public class Request<T>
    {
        public RequestHeader Header { set; get; }


        public string ToJsonString()
        {
            string json = JsonConvert.SerializeObject(this);
            return json;
        }

        public T Data { set; get; }
    }
}
